/*
 * Copyright 2008 the Sharedvine OSS Project and the Others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
${template.generateJavaPackageSentence()}

<#list template.generateJavaImportClassSentences() as item>
${item}
<#if !item_has_next>

</#if>
</#list>
/**
 * ${model.getDescription()}のファクトリ.
 * @author mogen
 * @version $Revision$
 */
public final class ${template.getGenerateFactoryClassName()} {

    /**
     * プライベートコンストラクタ.
     */
    private ${template.getGenerateFactoryClassName()}() {
    }

    /**
     * ${model.getDescription()}を文字表現をもとに構築する.
     * @param value ${model.getDescription()}の文字表現
     */
    public static ${model.getShortClassName()} create(final String value) {
        return new ${model.getShortClassName()}(value);
    }

<#if template.isDecimal() = true || template.isDateTime()>
    /**
     * ${model.getDescription()}を数値表現をもとに構築する.
     * @param value ${model.getDescription()}の数値表現
     */
    public static ${model.getShortClassName()} create(final ${template.addImportFullClassName("java.math.BigDecimal")} value) {
        return new ${model.getShortClassName()}(value);
    }

</#if>
}
